package util;

import java.util.Vector;

public class DjObservable {
	protected Vector observers = new Vector(1);
	
	public void addObserver(DjObserver observer) {
		observers.addElement(observer);
	}
	
	public void notifyObservers(){
		notifyObservers(null);
	}

	public void notifyObservers(Object obj){
		for (int i = 0; i < observers.size(); i++){
			((DjObserver)observers.elementAt(i)).update(this, obj);
		}
	}
}